
<div id="comment<%= comment.id %>" class="blogComment"<%if (comment.collapsed) %>style="display:none"<%end%>>	 
	<div class="blogUserImage">
		<%= comment.user_image_tag %>
	</div>	
	 <div class="triangle-right left">
        
        
        <div class="baloon_header">
			<div id="flash_messages_comment_<%= comment.id %>" style="height:20px">
				
			</div>
			<div class="blogCommentPostedAt">
				Inserito il <span class="blogPostDate"><%= comment.formatted_created_at%></span>
				da <span class="blogPoster"><%= comment.user.link_to_page %></span>		 		
			</div>
		</div>
		<div class="baloon-content">
			<%= h(comment.parsed_body) %>
		</div>
		<div class="baloon-footer">
			<% if current_user and (current_user.id == comment.user_id or current_user.id == @blog_post.user_id) %>
			<p>
					<%= link_to_remote 'Cancella', {:url => {:action => "ajaxdestroy", :controller => "blog_comments", :blog_post_id => @blog_post.id, :id => comment.id},
					:update => "blogPostComments"},
					{:id => "delete#{comment.id}"} %>
			</p>										   
			<% end %>	
		</div>
	<script>	
		var onClick<%=comment.id%> = new Function($('#delete<%= comment.id%>').attr('onClick'));		
		function nuova() {			
			if (confirm('Sei sicuro di voler cancellare questo commento?')) {			
				$('#comment<%= comment.id%>').hide(600,onClick<%=comment.id%>);
			}
			return false;		
		}									
		$('#delete<%= comment.id%>').removeAttr('onclick').click(nuova);
		<%if (comment.collapsed) %>
			$('#comment<%= comment.id%>').show(600);
	    <%end%>
		
		
	</script>
	</div>
</div>